﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace SharedMobilePlatform
{
	public partial class MainPage : ContentPage
	{
	    private string raspNamn;

		public MainPage ()
		{
			InitializeComponent ();
            Navigation.PushModalAsync(new SelectPage("Myggdräpe"));
		}


	    async void GetCharactersButtonClicked(object sender, EventArgs args)
	    {

            Button button = (Button)sender;
	        if (String.IsNullOrWhiteSpace(raspNamn))
	        {
                await Navigation.PushModalAsync(new SelectPage(raspNamn));
	        }
	    }

        async void OnRaspnameChanged(object sender, PropertyChangedEventArgs args)
        {
            Entry text = (Entry) sender;
            raspNamn = text.Text;
        }
	}
}
